package io.github.guojiaxing1995.easyJmeter.vo;

import io.github.guojiaxing1995.easyJmeter.common.enumeration.JmeterStatusEnum;
import io.github.guojiaxing1995.easyJmeter.common.enumeration.TaskResultEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;

@Data
@Builder
@NoArgsConstructor
public class TaskProgressVO {

    private String taskId;

    private JmeterStatusEnum status;

    private HashMap<String, Integer> taskProgress;

    private TaskResultEnum taskResult;
    
    private Boolean readyToRun;
    
    public TaskProgressVO(String taskId, JmeterStatusEnum status, HashMap<String, Integer> taskProgress, TaskResultEnum taskResult) {
        this.taskId = taskId;
        this.status = status;
        this.taskProgress = taskProgress;
        this.taskResult = taskResult;
        this.readyToRun = false;
    }
    
    public TaskProgressVO(String taskId, JmeterStatusEnum status, HashMap<String, Integer> taskProgress, TaskResultEnum taskResult, Boolean readyToRun) {
        this.taskId = taskId;
        this.status = status;
        this.taskProgress = taskProgress;
        this.taskResult = taskResult;
        this.readyToRun = readyToRun;
    }
}
